package com.sport.dao;

import com.sport.bean.Admin;
import com.sport.bean.PageParam;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IAdminDao {



//分页
    List<Admin> listPage(@Param("page")PageParam<Admin> page);
//  根据账号查找
    Admin findByName(String username);
    //根据ID查找d
    Admin findById(Integer id);
//更改密码 和管理员用户名
    int updatePwd(String newPwd, String username);
//更新管理员个人信息
    int updateAdmin(@Param("admin") Admin admin);


//添加管理员
    int addAdmin(Admin admin);

//删除
    @Delete("DELETE FROM `admin` WHERE `id` = #{id}")
    int deleteAdmin(Integer id);
}
